<%@ include file="../../../base/include.jsp" %>

<c:if test="${loggedUsersCommand.prevPage || loggedUsersCommand.nextPage}">
	<div class="pagination pull-right">
		<ul>
			<c:if test='${!loggedUsersCommand.prevPage}'>
				<li class="disabled"><a>FIRST</a></li>
				<li class="prev disabled"><a>&larr;</a></li>
			</c:if>
			<c:if test='${loggedUsersCommand.prevPage}'>
				<li><a href="<c:url value='/admin/user/list/logged/page/0'/>">FIRST</a></li>
				<li class="prev"><a href="<c:url value='/admin/user/list/logged/page/${loggedUsersCommand.page - 1}'/>">&larr;</a></li>
			</c:if>
				<c:if test="${loggedUsersCommand.page - 2 >= 0}">
				<li><a href="<c:url value='/admin/user/list/logged/page/${loggedUsersCommand.page - 2}' />">${loggedUsersCommand.page - 1}</a></li>
			</c:if>
			<c:if test="${loggedUsersCommand.page - 1 >= 0}">
				<li><a href="<c:url value='/admin/user/list/logged/page/${loggedUsersCommand.page - 1}' />">${loggedUsersCommand.page}</a></li>
			</c:if>
			<li class="active"><a href="<c:url value='/admin/user/list/logged/page/${loggedUsersCommand.page}' />">${loggedUsersCommand.page + 1}</a></li>
			<c:if test="${loggedUsersCommand.page + 1 <= userMaxPage}">
				<li><a href="<c:url value='/admin/user/list/logged/page/${loggedUsersCommand.page + 1}' />">${loggedUsersCommand.page + 2}</a></li>
			</c:if>
			<c:if test="${loggedUsersCommand.page + 2 <= userMaxPage}">
				<li><a href="<c:url value='/admin/user/list/logged/page/${loggedUsersCommand.page + 2}' />">${loggedUsersCommand.page + 3}</a></li>
			</c:if>
			
			<c:if test='${!loggedUsersCommand.nextPage}'>
				<li class="next disabled"><a>&rarr;</a></li>
				<li class="disabled"><a>LAST</a></li>
			</c:if>
			<c:if test='${loggedUsersCommand.nextPage}'>
				<li class="next"><a href="<c:url value='/admin/user/list/logged/page/${loggedUsersCommand.page + 1}'/>">&rarr;</a></li>
				<li><a href="<c:url value='/admin/user/list/logged/page/${userMaxPage}'/>">LAST</a></li>
			</c:if>
		</ul>
	</div>
</c:if>
